package com.example.exceltosqlite.util;

import java.util.regex.Matcher;
import java.util.regex.Pattern;

public class MyUtil {

    public static boolean isCharAndNumber(String pStr) {
        String str = "^[A-Za-z0-9]+$";
        Pattern p = Pattern.compile(str);
        Matcher m = p.matcher(pStr);
        return m.matches();
    }

    public static boolean isNumber(String pStr) {
        String str = "^[0-9]+$";
        Pattern p = Pattern.compile(str);
        Matcher m = p.matcher(pStr);
        return m.matches();
    }
}
